// PostList
.day > *:not(.postTitle[role="heading"]),
.PostListTitle ~ .pager,
.PostList > *:not(.postTitl2[role="heading"]) {
  @extend [hidden];
}

// .dayTitle {
//   @extend [hidden];
//   color: var(--fg);
//   font-weight: 700;
//   font-size: 2.25em;
//   margin-top: 0;
//   margin-bottom: 0.8888889em;
//   line-height: 1.1111111;

//   a {
//     pointer-events: none;
//   }
// }
#myposts,
.PostList {
  margin: 0;
  font-size: 100%;
}

.PostListTitle {
  margin-left: -0.25rem;
  text-transform: uppercase;
}

.postTitle[role="heading"],
.postTitl2[role="heading"] {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;

  a {
    display: block;
    font-size: 1.125rem;
    line-height: 1.75rem;
    opacity: 0.6;
    color: var(--fg-darker);
    transition: opacity 200ms ease-out;

    &:hover {
      opacity: 1;
    }

    .pinned-post-mark {
      position: relative;
      top: -0.5rem;
      font-size: .75rem;
      line-height: 1rem;
      vertical-align: baseline;
      border-radius: 0.25rem;
      padding: 0.05rem 0.25rem;
      border: 1px solid currentColor;
    }

    [blackcat] {
      display: grid;
      grid-template-columns: repeat(5, max-content);
      align-items: center;
      margin-top: -0.25rem;
      font-size: .875rem;
      line-height: 1.25rem;
      opacity: 0.5;
      grid-gap: 0.5rem;
      gap: 0.5rem;

      > span {
        display: inline-flex;
        align-items: center;
        opacity: 0.5;

        // &:not(:first-child) {
        //   margin-left: 0.5rem;
        // }
      }

      svg {
        margin-right: 0.25rem;
        width: 1rem;
        height: 1rem;
      }
    }
  }
}

h1.postTitle,
h1.PostListTitle {
  color: var(--fg-darker);
  font-weight: 700;
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;

  span {
    vertical-align: inherit;
  }
}

h1.postTitle ~ [blackcat] {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  margin-top: -.5rem;
  margin-bottom: 2rem;
  opacity: 0.5;
  grid-gap: 0.5rem;
  gap: 0.5rem;

  > span {
    display: inline-flex;
    align-items: center;
  }

  svg {
    margin-right: 0.25rem;
    width: 1rem;
    height: 1rem;
  }
}

#topics > .post > {
  .clear,
  .postDesc {
    @extend [hidden];
  }
}

// Post
#cnblogs_post_body,
.cnblogs-post-body {
  a {
    color: var(--fg-darker);
    font-weight: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(125, 125, 125, 0.3);
    transition: border 0.3s ease-in-out;

    .dark & {
      border-bottom-color: rgba(125, 125, 125, 0.5);
    }

    &:hover {
      border-bottom: 1px solid var(--accent);
    }

    // code {
    //   color: #111827;
    // }
  }

  strong {
    color: var(--fg-dark);
    font-weight: 600;
  }

  ol > li,
  ul > li {
    position: relative;
    padding-left: 1.75em;
    list-style-type: none;
  }

  ol > li::before {
    content: counter(list-item, decimal) ".";
    position: absolute;
    font-weight: 400;
    color: #6b7280;
    left: 0;
  }

  ul > li::before {
    content: "";
    position: absolute;
    background-color: #d1d5db;
    border-radius: 50%;
    width: 0.375em;
    height: 0.375em;
    top: calc(0.875em - 0.1875em);
    left: 0.25em;
  }

  hr {
    background-color: rgba(125,125,125,0.3);
    margin: 2em auto;
  }

  blockquote {
    margin: 1.6em 0;
    padding: 0.6em 1.2em;
    border-width: 0;
    border-style: solid;

    color: inherit;
    border-left-width: 0.25rem;
    border-color: rgba(125,125,125,0.3);
    quotes: "\201C""\201D""\2018""\2019";

    line-height: 1.5em;
    opacity: 0.8;

    > :first-child {
      margin-top: 0;
    }

    > :last-child {
      margin-bottom: 0;
    }
  }

  h1 {
    color: var(--fg-darker);
    font-weight: 700;
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
  }

  h2 {
    color: var(--fg-dark);
    font-weight: 700;
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
  }

  h3 {
    color: inherit;
    font-weight: 600;
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
  }

  h4 {
    color: inherit;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.5;
  }

  figure figcaption {
    color: #6b7280;
    font-size: 0.875em;
    line-height: 1.4285714;
    margin-top: 0.8571429em;
  }

  code {
    color: var(--fg-dark);
    font-weight: 600;
    font-size: 0.875em;
    padding: unset;
    line-height: unset;
    margin: unset;
    display: unset;
    overflow-x: unset;
    vertical-align: unset;
    border-radius: unset;
    background-color: unset;

    &::before,
    &::after {
      content: "`";
    }
  }

  pre {
    color: var(--prism-foreground);
    background: var(--prism-background);
    overflow: auto hidden;
    font-size: 0.9em;
    line-height: 1.5em;
    margin: 0.5em 0;
    padding: 1em;
    border-width: 0;
    border-radius: 0.3em;

    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    line-height: var(--prism-line-height);
    tab-size: var(--prism-tab-size);
    hyphens: none;
    color: var(--prism-foreground) !important;

    code {
      background-color: transparent;
      border-width: 0;
      border-radius: 0;
      padding: 0;
      font-weight: 400;
      font-size: var(--prism-font-size);
      font-family: var(--prism-font-family);
      line-height: var(--prism-line-height);
      white-space: pre;

      &::before,
      &::after {
        content: none;
      }
    }
  }

  table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7142857;
  }

  thead {
    color: #111827;
    font-weight: 600;
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;

    th {
      vertical-align: bottom;
      padding-right: 0.5714286em;
      padding-bottom: 0.5714286em;
      padding-left: 0.5714286em;
    }
  }

  tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #e5e7eb;

    &:last-child {
      border-bottom-width: 0;
    }
  }

  tbody td {
    vertical-align: top;
    padding-top: 0.5714286em;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
  }

  p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
  }

  img, video, figure {
    margin-top: 2em;
    margin-bottom: 2em;
  }

  figure > * {
    margin-top: 0;
    margin-bottom: 0;
  }

  h2 code {
    font-size: 0.875em;
  }

  h3 code {
    font-size: 0.9em;
  }

  ol, ul {
    margin: 1.25em 0;
    padding: 0;
    list-style-type: none;
  }

  li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }

  & > ul > li p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
  }

  & > ol > li > *:first-child {
    margin-top: 1.25em;
  }

  & > ol > li > *:last-child {
    margin-bottom: 1.25em;
  }

  ul ul,
  ul ol,
  ol ul,
  ol ol {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
  }

  hr + *,
  h1 + *,
  h2 + *,
  h3 + *,
  h4 + *  {
    margin-top: 0;
  }

  h6 {
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 10px;
    opacity: 0.5;
    font-weight: 500;
    letter-spacing: 2px;
  }

  thead th:first-child {
    padding-left: 0;
  }
  thead th:last-child {
    padding-right: 0;
  }
  tbody td:first-child {
    padding-left: 0;
  }
  tbody td:last-child {
    padding-right: 0;
  }

  > :first-child {
    margin-top: 0;
  }

  > :last-child {
    margin-bottom: 0;
  }

  b {
    color: var(--fg-dark);
  }

  em {
    color: inherit;
  }
}
